class CreateInterests < ActiveRecord::Migration[6.0]
  def change
    create_table :interests do |t|
      t.integer :follower_id, null: false
      t.references :tag, null: false, foreign_key: true

      t.timestamps
    end

    add_index :interests, :follower_id
    add_index :interests, [:follower_id, :tag_id], unique: true
  end
end
